import os

if __name__=="__main__":
    print('start...')
    path = "E:\妖精"
    file_path = []
    for p,d,fs in os.walk(path):
        # print(p.split("\\"))
        if len(p.split("\\"))>2:
            file_name = p.split("\\")[2]+".mp4"
            print(file_name)
            os.chdir(p)
            os.system("copy /b *.ts "+file_name)
            # os.system()


    # for fp in file_path:
    #     file_name = fp.split("\\")[2]
    #
    #     os.system("copy /b"+fp+" "+file_name+".mp4")
